/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2023-11-09
 * Time: 10:44
 */

class Test1{
    public String toString() {
        System.out.print("aaa");
        return "bbb";
    }
}



//测试对象的打印 （toString方法的使用）
//联系Test1
public class Test {

    public static void main(String[] args) {
        Test1 test = new Test1();
        System.out.println(test);
    }


    public static void main1(String[] args) {
        TestDemo test = new TestDemo();
        test.aMethod();
        int j = test.aMethod();
        System.out.println(j);
    }
}
